package com.seed.core.pojo;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class Node<T> {
    private String value;
    private String label;
    private T data;
    private List<Node<T>> children;

    public Node(){

    }

    public Node(String value) {
        this.value = value;
    }

    public Node(String value, String label) {
        this(value);
        this.label = label;
    }

    public Node(String value, String label, List<Node<T>> children) {
        this(value, label);
        this.children = children;
    }

    public String getValue() {
        return value;
    }

    public Node setValue(String value) {
        this.value = value;
        return this;
    }

    public String getLabel() {
        return label;
    }

    public Node setLabel(String label) {
        this.label = label;
        return this;
    }

    public T getData() {
        return data;
    }

    public Node setData(T data) {
        this.data = data;
        return this;
    }

    public List<Node<T>> getChildren() {
        return children;
    }

    public Node<T> setChildren(List<Node<T>> children) {
        this.children = children;
        return this;
    }
}

